import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
// const path = require('path')
import path from 'path' // 导入path路径
import vueSetupExtend from 'vite-plugin-vue-setup-extend'

// https://vitejs.dev/config/
export default defineConfig({
    css: {
        preprocessorOptions: {
            less: {
                additionalData: `
                    @import "@/assets/styles/variables.less";
                    @import "@/assets/styles/mixins.less";
                `,
            },
        },
    },
    plugins: [vue(), vueSetupExtend()],
    resolve: {
        alias: {
            '@': path.resolve(__dirname, './src'),
        },
    },
    server: {
        port: 3000,
    },
})
